import request from '@/utils/request'

// 获取设备物料下拉列表
export function getEquipmentMaterialList() {
  return request({
    url: '/operation/web/operationInOutManagement/equipmentMaterialList',
    method: 'get'
  })
}

// 查询出入库管理列表
export function listInOutManagement(params) {
  return request({
    url: '/operation/web/operationInOutManagement/list',
    method: 'get',
    params
  })
}

// 获取出入库管理详细信息
export function getInOutManagementDetail(id) {
  return request({
    url: `/operation/web/operationInOutManagement/${id}`,
    method: 'get'
  })
}

// 新增出入库管理
export function addInOutManagement(data) {
  return request({
    url: '/operation/web/operationInOutManagement',
    method: 'post',
    data
  })
}

// 完成出入库操作
export function completeInOutManagement(id) {
  return request({
    url: '/operation/web/operationInOutManagement/complete',
    method: 'put',
    params: { id }
  })
}

// 删除出入库管理
export function deleteInOutManagement(ids) {
  return request({
    url: `/operation/web/operationInOutManagement/${ids}`,
    method: 'delete'
  })
}